package cn.edu.lingnan.fruitshop.controller;


import cn.edu.lingnan.fruitshop.common.JSONResult;
import cn.edu.lingnan.fruitshop.service.OrderdetailService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.*;

import javax.servlet.http.HttpSession;

/**
 * <p>
 *  前端控制器
 * </p>
 *
 * @author 张小凡
 * @since 2022-01-04
 */
@Controller
@RequestMapping("/orderdetail")
public class OrderdetailController {
    @Autowired
    private OrderdetailService orderdetailService;
    //处理提交订单
    @PostMapping("/submitOrder")
    @ResponseBody
    public JSONResult<Integer> submitOrder(String goodIds, String goodNums, String allPrice, HttpSession session){
        return orderdetailService.submitOrder(goodIds, goodNums, allPrice, session);
    }
}

